package com.wl4837;

// 具体访问者 - 检查部件状态
class ComputerPartCheckVisitor implements ComputerPartVisitor {
    @Override
    public void visit(Computer computer) {
        System.out.println("检查计算机状态");
    }

    @Override
    public void visit(Mouse mouse) {
        System.out.println("检查鼠标状态");
    }

    @Override
    public void visit(Keyboard keyboard) {
        System.out.println("检查键盘状态");
    }

    @Override
    public void visit(Monitor monitor) {
        System.out.println("检查显示器状态");
    }
}
